Skip to content

feat(platform filters): sort, search, and 'Has Games' filter#89

Open
jtbrough wants to merge 1 commit intorommapp:mainfrom
jtbrough:feature/platform-filter-improvements
Open

feat(platform filters): sort, search, and 'Has Games' filter#89
jtbrough wants to merge 1 commit intorommapp:mainfrom
jtbrough:feature/platform-filter-improvements

Conversation

@jtbrough
Copy link
Copy Markdown
Contributor

Summary

Implemented search, sorting, and "Has Game" filtering to the platform filters modals found in settings and in initial setup. The intent is to hopefully make it easier for users to target a subset of their platforms.

Overview:
Adds Search, Sort, and Filter buttons to toolbar.
1-overview

"Has Games" Filter:
Allows users to filter platforms to only those with games present.
2-has_games

Sort:
Allows users to sort the platforms listed by name (asc, desc) game count (asc, desc) or default (current sort).
3-sort

Search:
Allows users to search platforms based on strings. Can be combined with the above filters/sorting.
4-search

Related Issue

N/A

Changes

PlatformFilterLogic.kt (new)
Added logic for search, sort , and "Has Games" filtering.

PlatformFilterLogicTest.kt (new)
Added unit test coverage with specific cases for numeric sorting (1, 2, 10).

SyncSettingsDelegateExt.kt (new)
Added extension functions for filter state updates in Settings.

PlatformFiltersModal.kt (modified)
Compact header with search/sort/filter controls.

FirstRunScreen.kt (modified)
Compact header with search/sort/filter controls.

PlatformDao.kt (modified)
Switched to REPLACE conflict strategy to ensure platform metadata (like game counts) stays updated.

SettingsModels.kt (modified)
Added state fields for filter, sort, and search settings across the app.

SyncSettingsDelegate.kt (modified)
Updated platform loading flow to apply the new filtering and sorting logic.

SyncSettingsSection.kt (modified)
Aligned variable names and modal parameter passing.

SettingsViewModel.kt (modified)
Filter/sort methods and integrated extension functions.

FirstRunViewModel.kt (modified)
Filter logic into the Wizard with focus reset (index 0) whenever filters change.

Testing

Local avd and Odin 2 debug builds tested against my RomM library.

Checklist

  • Code compiles without errors
  • Tests pass locally
  • Lint checks pass
  • Self-reviewed the code

…ring - Add PlatformFilterLogic for searching, sorting, and filtering - Refactor platform filter modals to include small header with controls - Implement expandable search, sort dropdown, and FilterChip - Add test coverage for filter/sort scenarios
@tmgast
Copy link
Copy Markdown
Member

tmgast commented Jan 26, 2026

At a glance, everything seems good. I'll take a deeper look and try to get it merged this week if it all checks out. Nice work on this!

@jtbrough
Copy link
Copy Markdown
Contributor Author

@tmgast will have a minor fix coming (hopefully today). In further testing I noticed some odd behavior with toggles and the list refreshing. Will update the PR once I have that dialed in for settings and the initial setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants